package com.genexususa.eo.bing.test.delete;

import com.genexususa.eo.bing.connection.AdExtensionManager;
import com.genexususa.eo.bing.test.TestUtil;

public class ConsumeDeleteAdExtensionsFromCampaigns {
    public static void main(String[] args) {
        TestUtil testUtil = new TestUtil();
        String adExtensionsXML =    "<Bing_AdExtensionIdToCampaignIdAssociationCollection xmlns=\"https://adcenter.microsoft.com/v8\">\n" +
                                        "\t<AdExtensionIdToCampaignIdAssociation xmlns=\"https://adcenter.microsoft.com/v8\">\n" +
                                            "\t\t<GxAdExtensionId>9498410</GxAdExtensionId>\n" +
                                            "\t\t<BingAdExtensionId>" + testUtil.siteLinksAdExtensionId1 + "</BingAdExtensionId>\n" +
                                            "\t\t<GxCampaignId>9640652</GxCampaignId>\n" +
                                            "\t\t<BingCampaignId>" + testUtil.campaignId1 + "</BingCampaignId>\n" +
                                        "\t</AdExtensionIdToCampaignIdAssociation>\n" +
                                        "\t<AdExtensionIdToCampaignIdAssociation xmlns=\"https://adcenter.microsoft.com/v8\">\n" +
                                            "\t\t<GxAdExtensionId>9498411</GxAdExtensionId>\n" +
                                            "\t\t<BingAdExtensionId>" + testUtil.siteLinksAdExtensionId2 + "</BingAdExtensionId>\n" +
                                            "\t\t<GxCampaignId>9640653</GxCampaignId>\n" +
                                            "\t\t<BingCampaignId>" + testUtil.campaignId2 + "</BingCampaignId>\n" +
                                        "\t</AdExtensionIdToCampaignIdAssociation>\n" +
                                    "</Bing_AdExtensionIdToCampaignIdAssociationCollection>\n";
        AdExtensionManager resource = new AdExtensionManager();
        System.out.println("Consuming DeleteAdExtensionsFromCampaigns.....");
        String userName = testUtil.userName;
        String password = testUtil.password;
        String developerToken = testUtil.developerToken;
        long customerId = testUtil.customerId;
        long customerAccountId = testUtil.customerAccountId;
        String applicationId = testUtil.applicationId;
        long accountId = testUtil.accountId1;
        String result = resource.deleteAdExtensionsFromCampaigns(customerAccountId, adExtensionsXML);
        System.out.println("Result:\n" + result);
    }
}
